<script type="text/javascript">
  RED.nodes.registerType("lower-case", {
    category: "function",
    color: "#a6bbcf",
    defaults: {
      name: { value: "" },
      haha: { value: "custom-demo" },
    },
    inputs: 1,
    outputs: 1,
    icon: "file.svg",
    label: function () {
      return this.name || "lower-case";
    },
    oneditsave: function () {
      this.headers.push({
        haha: "哈哈",
      });
    },
  });
</script>

<script type="text/html" data-template-name="lower-case">
  <div class="form-row">
    <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
    <input type="text" id="node-input-name" placeholder="Name" />
    <input type="text" id="node-input-haha" placeholder="自定义的哈哈" />
  </div>
</script>

<script type="text/html" data-help-name="lower-case">
  <p>
    A simple node that converts the message payloads into all lower-case
    characters
  </p>
</script>
